<?php
/*
 * ------------------------------------------------------------------------
 * JA Social Template for Joomla 2.5
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - Copyrighted Commercial Software
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites:  http://www.joomlart.com -  http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 * ------------------------------------------------------------------------
*/
// no direct access
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 

?>

	<?php $this->genBlockBegin ($block) ?>
	
	<?php
	$app = & JFactory::getApplication();
	$siteName = $app->getCfg('sitename');
	if ($this->getParam('logoType', 'image')=='image'): ?>
	<h1 class="logo">
		<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
	</h1>
	<?php else:
	$logoText = (trim($this->getParam('logoText'))=='') ? $siteName : JText::_(trim($this->getParam('logoText')));
	$sloganText = JText::_(trim($this->getParam('sloganText'))); ?>
	<div class="logo-text">
		<h1><a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
		<p class="site-slogan"><?php echo $sloganText;?></p>
	</div>
	<?php endif; ?>
	
	<?php if($this->countModules('search')) : ?>
	<div id="ja-search">
		<jdoc:include type="modules" name="search" />
	</div>
	<?php endif; ?>

	<?php $this->genBlockEnd ($block) ?>
<script type="text/javascript">
//<![CDATA[
//Set min-height
window.addEvent('load', function() {
	if($('ja-mainnav')){
		var menus = $('ja-mainnav').getElement('ul').getChildren('li');
		if(menus.length >0){
			var min_height = menus[0].getHeight();
			for (var i = 0; i < menus.length; i++){ 
				if (menus[i].getHeight() > min_height) min_height = menus[i].getHeight();
			}
			for (var i = 0; i < menus.length; i++){ 
				menus[i].setStyle('min-height', min_height+'px');
				if(menus[i].getElement('a')){
					menus[i].getElement('a').setStyle('min-height', min_height+'px');
				}
			}
		}
	}
});
//]]>
</script>